home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3x / handle.z / handle
Encoding:
Text File  |  2002-10-03  |  11.3 KB  |  199 lines

  1.  
  2.  
  3.  
  4. HHHHAAAANNNNDDDDLLLLEEEE((((3333))))                                                            HHHHAAAANNNNDDDDLLLLEEEE((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      path_to_handle, path_to_fshandle, fd_to_handle, handle_to_fshandle,
  10.      open_by_handle, readlink_by_handle, attr_multi_by_handle,
  11.      attr_list_by_handle, fssetdm_by_handle, free_handle - file handle
  12.      operations
  13.  
  14. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  16.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////hhhhaaaannnnddddlllleeee....hhhh>>>>
  17.  
  18.      iiiinnnntttt ppppaaaatttthhhh____ttttoooo____hhhhaaaannnnddddlllleeee ((((cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, vvvvooooiiiidddd ********hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt ****hhhhlllleeeennnn))));;;;
  19.  
  20.      iiiinnnntttt ppppaaaatttthhhh____ttttoooo____ffffsssshhhhaaaannnnddddlllleeee ((((cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, vvvvooooiiiidddd ********hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt ****hhhhlllleeeennnn))));;;;
  21.  
  22.      iiiinnnntttt ffffdddd____ttttoooo____hhhhaaaannnnddddlllleeee ((((iiiinnnntttt ffffdddd,,,, vvvvooooiiiidddd ********hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt ****hhhhlllleeeennnn))));;;;
  23.  
  24.      iiiinnnntttt hhhhaaaannnnddddlllleeee____ttttoooo____ffffsssshhhhaaaannnnddddlllleeee ((((vvvvooooiiiidddd ****hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt hhhhlllleeeennnn,,,, vvvvooooiiiidddd ********ffffsssshhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt ****ffffsssshhhhlllleeeennnn))));;;;
  25.  
  26.      iiiinnnntttt ooooppppeeeennnn____bbbbyyyy____hhhhaaaannnnddddlllleeee ((((vvvvooooiiiidddd ****hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt hhhhlllleeeennnn,,,, iiiinnnntttt ooooffffllllaaaagggg))));;;;
  27.  
  28.      iiiinnnntttt rrrreeeeaaaaddddlllliiiinnnnkkkk____bbbbyyyy____hhhhaaaannnnddddlllleeee ((((vvvvooooiiiidddd ****hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt hhhhlllleeeennnn,,,, vvvvooooiiiidddd ****bbbbuuuuffff,,,, ssssiiiizzzzeeee____tttt bbbbssss))));;;;
  29.  
  30.      iiiinnnntttt aaaattttttttrrrr____mmmmuuuullllttttiiii____bbbbyyyy____hhhhaaaannnnddddlllleeee ((((vvvvooooiiiidddd ****hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt hhhhlllleeeennnn,,,, vvvvooooiiiidddd ****bbbbuuuuffff,,,,
  31.                                            iiiinnnntttt rrrrttttrrrrvvvvccccnnnntttt,,,, iiiinnnntttt ffffllllaaaaggggssss))));;;;
  32.  
  33.      iiiinnnntttt aaaattttttttrrrr____lllliiiisssstttt____bbbbyyyy____hhhhaaaannnnddddlllleeee ((((vvvvooooiiiidddd ****hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt hhhhlllleeeennnn,,,, cccchhhhaaaarrrr ****bbbbuuuuffff,,,, ssssiiiizzzzeeee____tttt bbbbuuuuffffssssiiiizzzz,,,,
  34.                                           iiiinnnntttt ffffllllaaaaggggssss,,,, ssssttttrrrruuuucccctttt aaaattttttttrrrrlllliiiisssstttt____ccccuuuurrrrssssoooorrrr ****ccccuuuurrrrssssoooorrrr))));;;;
  35.  
  36.      iiiinnnntttt ffffsssssssseeeettttddddmmmm____bbbbyyyy____hhhhaaaannnnddddlllleeee ((((vvvvooooiiiidddd ****hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt hhhhlllleeeennnn,,,, ssssttttrrrruuuucccctttt ffffssssddddmmmmiiiiddddaaaattttaaaa ****ffffsssssssseeeettttddddmmmm))));;;;
  37.  
  38.      vvvvooooiiiidddd ffffrrrreeeeeeee____hhhhaaaannnnddddlllleeee ((((vvvvooooiiiidddd ****hhhhaaaannnnpppp,,,, ssssiiiizzzzeeee____tttt hhhhlllleeeennnn))));;;;
  39.  
  40. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  41.      These functions provide a way to perform certain filesystem operations
  42.      without using a file descriptor to access filesystem objects.  They are
  43.      intended for use by a limited set of system utilities such as backup
  44.      programs.  They are supported only by the XFS filesystem.  Device
  45.      management capabilities or root privileges are required to use
  46.      _o_p_e_n__b_y__h_a_n_d_l_e() _r_e_a_d_l_i_n_k__b_y__h_a_n_d_l_e(), _a_t_t_r__m_u_l_t_i__b_y__h_a_n_d_l_e(),
  47.      _a_t_t_r__l_i_s_t__b_y__h_a_n_d_l_e(), and _f_s_s_e_t_d_m__b_y__h_a_n_d_l_e().  Link with the -_l_d_m
  48.      library to access these functions.
  49.  
  50.      A _h_a_n_d_l_e uniquely identifies a filesystem object or an entire filesystem.
  51.      There is one and only one handle per filesystem or filesystem object.
  52.      Handles consist of some number of bytes.  The size of a handle (i.e. the
  53.      number of bytes comprising it) varies by the type of handle and may vary
  54.      for different objects of the same type.  The content of a handle is
  55.      opaque to applications.  Since handle sizes vary and their contents are
  56.      opaque, handles are described by two quantities, a pointer and a size.
  57.      The size indicates the number of bytes in the handle which are pointed to
  58.      by the pointer.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. HHHHAAAANNNNDDDDLLLLEEEE((((3333))))                                                            HHHHAAAANNNNDDDDLLLLEEEE((((3333))))
  71.  
  72.  
  73.  
  74.      The _p_a_t_h__t_o__h_a_n_d_l_e() function returns the handle for the object given by
  75.      the _p_a_t_h argument.  If the final component of the path name is a symbolic
  76.      link, the handle returned is that of the link itself.
  77.  
  78.      The _p_a_t_h__t_o__f_s_h_a_n_d_l_e() function returns the handle for the filesystem in
  79.      which the object given by the _p_a_t_h argument resides.
  80.  
  81.      The _f_d__t_o__h_a_n_d_l_e() function returns the handle for the object referenced
  82.      by the _f_d argument, which must be a valid file descriptor.
  83.  
  84.      The _h_a_n_d_l_e__t_o__f_s_h_a_n_d_l_e() function returns the handle for the filesystem
  85.      in which the object referenced by the handle given by the _h_a_n_p and _h_l_e_n
  86.      arguments resides.
  87.  
  88.      The _o_p_e_n__b_y__h_a_n_d_l_e() function opens a file descriptor for the object
  89.      referenced by a handle.  It is analogous and identical to _o_p_e_n(_2) with
  90.      the exception of accepting handles instead of path names.
  91.  
  92.      The _r_e_a_d_l_i_n_k__b_y__h_a_n_d_l_e() function returns the contents of a symbolic link
  93.      referenced by a handle.
  94.  
  95.      The _a_t_t_r__m_u_l_t_i__b_y__h_a_n_d_l_e() function manipulates multiple user attributes
  96.      on a filesystem object.  It is analogous and identical to _a_t_t_r__m_u_l_t_i_f(_2)
  97.      except that a handle is specified instead of a file descriptor.
  98.  
  99.      The _a_t_t_r__l_i_s_t__b_y__h_a_n_d_l_e() function returns the names of the user
  100.      attributes of a filesystem object.  It is analogous and identical to
  101.      _a_t_t_r__l_i_s_t_f(_2) except that a handle is specified instead of a file
  102.      descriptor.
  103.  
  104.      The _f_s_s_e_t_d_m__b_y__h_a_n_d_l_e() function sets the di_dmevmask and di_dmstate
  105.      fields in an XFS on-disk inode.  It is analogous to the _F__F_S_S_E_T_D_M
  106.      subfunction of _f_c_n_t_l(_2) except that a handle is specified instead of a
  107.      file descriptor.
  108.  
  109.      The _f_r_e_e__h_a_n_d_l_e() function frees the storage allocated for handles
  110.      returned by the following functions:  _p_a_t_h__t_o__h_a_n_d_l_e(),
  111.      _p_a_t_h__t_o__f_s_h_a_n_d_l_e(), _f_d__t_o__h_a_n_d_l_e(), and _h_a_n_d_l_e__t_o__f_s_h_a_n_d_l_e().
  112.  
  113.      In IRIX releases prior to 6.5 the declarations for these functions were
  114.      obtained by including <<<<ssssyyyyssss////ffffssss////xxxxffffssss____hhhhaaaannnnddddlllleeee....hhhh>>>> instead of <<<<ssssyyyyssss////hhhhaaaannnnddddlllleeee....hhhh>>>>....
  115.  
  116. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  117.      open(2), readlink(2), attr_multi(2), attr_list(2), fcntl(2).
  118.  
  119. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  120.      The function _f_r_e_e__h_a_n_d_l_e() has no failure indication.  The other
  121.      functions return the value 0 to the calling process if they succeed;
  122.      otherwise, they return the value -1 and set _e_r_r_n_o to indicate the error:
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. HHHHAAAANNNNDDDDLLLLEEEE((((3333))))                                                            HHHHAAAANNNNDDDDLLLLEEEE((((3333))))
  137.  
  138.  
  139.  
  140.      [EACCES]       Search permission was denied for a component of _p_a_t_h.
  141.  
  142.      [EBADF]        _f_d is not a valid and open file descriptor.
  143.  
  144.      [EFAULT]       An argument pointed to an invalid address.
  145.  
  146.      [EINVAL]       _p_a_t_h is in a filesystem that does not support these
  147.                     functions.
  148.  
  149.      [ELOOP]        Too many symbolic links were encountered in translating
  150.                     the path name.
  151.  
  152.      [ENAMETOOLONG] A component of _p_a_t_h or the entire length of _p_a_t_h exceeds
  153.                     filesystem limits.
  154.  
  155.      [ENOENT]       A component of _p_a_t_h does not exist.
  156.  
  157.      [EPERM]        The caller does not have sufficient privileges.
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.